
<%@ page import="期中22.Thesql" %>
<%@ page import="期中22.Pd" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
    <title>结果</title>
	<style type="text/css">
		div {margin: 100px 400px;}
		th {width: 100px;}
	</style>
</head>

<body>
<%
	String zhuti="";
	String shijian="";
	String didian="";
	int leixing=-1;
try{zhuti=request.getParameter("zhuti");}
	catch(Exception e) {}
try{leixing=Integer.parseInt(request.getParameter("leixing")+"");}
	catch(Exception e) {}
try{shijian=request.getParameter("shijian");}
	catch(Exception e) {}
try{didian=request.getParameter("didian");}
	catch(Exception e) {}
Thesql the = new Thesql();
int[] arr=the.chaxun1(zhuti,shijian,didian,leixing);

/*------------------------------------------------------------------------------------------*/

//int i=0;
//out.print("主题   时间   地点   类型");
//%><br><%
//while(arr[i]!=0)
//{
//	Pd pdd=the.show(arr[i]);
//	out.print(pdd.zhuti+"   "+pdd.shijian+"   "+pdd.didian+"   ");
//	switch(pdd.leixing){
//	case 1:out.print("   社团竞赛");break;
//	case 2:out.print("   野外采风");break;
//	case 3:out.print("   校内集会");break;
//	case 4:out.print("   社团纳新");break;
//	}
//	%><br><%
//	i++;
//}
/*-------------------------------------------------------------------------------------------*/
%>
<div>
<form method="get" action="Xiangxi.jsp">
<table border="1" width="500" cellspacing="0">
           <caption>结果</caption>
     <tr>
           <th>主题</th>
           <th>时间</th>
           <th>地点</th>
           <th>类型</th>
           <th>详细</th>
    </tr>
    <% int i=0;
    while(arr[i]!=0)
    { 
    	Pd pdd=the.show(arr[i]);
    %>
    <tr>
           <td><% out.print(pdd.zhuti);%></td>
           <td><% out.print(pdd.shijian);%></td>
           <td><% out.print(pdd.didian);%></td>
           <td><% switch(pdd.leixing){
					case 1:out.print("   社团竞赛");break;
					case 2:out.print("   野外采风");break;
					case 3:out.print("   校内集会");break;
					case 4:out.print("   社团纳新");break;
			}%></td>
			<td> <button name="tid" value=<%=arr[i]%> type="submit">显示</button></td>
   </tr>
   <%i++;
  		 } %>
</table>







</form>
<input type="button" onclick="window.location.href='Themain.jsp';" value="返回主菜单"><br>
</div>



</body>
</html>